/*
 * OtherFsOperations.h
 *
 *  Created on: Apr 8, 2010
 *      Author: Lukasz Spintzyk
 */

#ifndef OTHERFSOPERATIONS_H_
#define OTHERFSOPERATIONS_H_

#ifndef PH_H_
#include "ph.h"
#endif

class Filesystem;

namespace fuse_cpp {

class FuseDispatcher;

}  // namespace fuse_cpp

namespace CudaCryptoFs {

/* TODO assign operrations and implement them if necessary:
		lock, bmap, flag_nullpath_ok, flag_reserved, ioctl, poll
*/

Filesystem* getFS(void);

void *init(struct fuse_conn_info *conn);

void destroy (void * fs);

int statfs(const char *path, struct statvfs *stats);

int readlink(const char *, char *, size_t);

int mknod(const char *, mode_t, dev_t);

int link(const char *, const char *);

int symlink(const char *, const char *);

int access(const char *path, int);

fuse_cpp::FuseDispatcher& initDispatcher();


/*******************************************/
void set_link_inode_content(const char* file, InodePtr inode);
void add_link_to_parent_directory(const char* link, InodePtr inode);

}

#endif /* OTHERFSOPERATIONS_H_ */
